package com.freewater.library.lending.book.presentation.request;

import com.freewater.library.lending.book.application.command.PutOnBookInstanceCommand;
import io.swagger.v3.oas.annotations.Parameter;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

@Data
public class PutOnBookInstanceRequest {

    @NotBlank(message = "二维码不能为空")
    @Parameter(description = "二维码")
    private final String qrCode;

    public PutOnBookInstanceCommand toCommand() {
        return new PutOnBookInstanceCommand(this.qrCode);
    }
}
